import java.util.Stack;

//栈 ：先进后出

public class Test {
    public static void main(String[] args) {
        MyStack stack = new MyStack();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        Integer a = stack.pop();
        System.out.println(a);//3
        Integer b = stack.peek();
        System.out.println(b);//2 获取2元素 并没有取出
        Integer b2 = stack.peek();
        System.out.println(b2);//2
        System.out.println(stack.isEmpty());



    }
}
